package xyz.yq56.easytool.utils.encrypt;

import java.util.Base64;

/**
 * @author yi qiang
 * @date 2021/9/21 13:17
 */
public class Base64Util {


    private Base64Util() {
    }

    public static String encode(byte[] src) {
        Base64.Encoder encoder = Base64.getEncoder();
        return encoder.encodeToString(src);
    }

    public static byte[] decode(String src) {
        Base64.Decoder decoder = Base64.getDecoder();
        return decoder.decode(src);
    }

}
